Provides mininum-norm solutions to linear models, identical to OLS in standard situations, but allowing exploration of overfitting in the overparameterized case. Also provides a wrapper for the polynomial case.
penroseLM(d,yName)
penrosePoly(d,yName,deg,maxInteractDeg=deg)
ridgePoly(d,yName,deg,maxInteractDeg=deg)
# S3 method for penroseLM
predict(object,...)
# S3 method for penrosePoly
predict(object,...)
Arguments for the predict
functions.
Dataframe, training set.
Name of the class labels column.
Polynomial degree.
Maximum degree of interaction terms.
A value returned by penroseLM
or
penrosePoly
.
First, provides a convenient wrapper to the polyreg package for
polynomial regression. (See qePoly
here for an even higher-level
wrapper.) Note that this computes true polynomials, with
cross-product/interaction terms rather than just powers, and that dummy
variables are handled properly (to NOT compute powers).
Second, provides a tool for exploring the "double descent" phenomenon, in which prediction error may improve upon fitting past the interpolation point.